package com.wn.class30.service.impl;

import com.wn.class30.entity.Token;
import com.wn.class30.mapper.TokenDao;
import com.wn.class30.service.TokenService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class TokenServiceImp implements TokenService {
    @Resource
    private TokenDao tokenDao;
    @Override
    public Token queryById(Integer id) throws Exception {
        Token token = tokenDao.selectByPrimaryKey(id);
        return token;
    }

    @Override
    public void updateById(Token token) throws Exception {
        tokenDao.updateByPrimaryKey(token);
    }

    @Override
    public void insertToken(Token token) throws Exception {
        tokenDao.insert(token);
    }


}
